﻿<Page
    x:Class="Мастерконд.Документы.SDELKIBASE"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Мастерконд.Документы"
    xmlns:data="using:DataAppModels"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <ScrollViewer ScrollViewer.HorizontalScrollMode="Auto" ScrollViewer.VerticalScrollMode="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" Background="White">

        <RelativePanel ScrollViewer.HorizontalScrollMode="Enabled" ScrollViewer.VerticalScrollMode="Auto" ScrollViewer.HorizontalScrollBarVisibility="Auto">
            <TextBlock x:Name="TextBlockCreateDocuments5" Text="БАЗА ДАННЫХ СДЕЛОК"  FontSize="16" FontWeight="SemiBold" Margin="20,10,0,0" Width="700" Foreground="Green"/>
            <TextBlock x:Name="TextBlockCreateDocumentsOpisanie5" Text="Этот раздел служит для создания базы данных сделок за год или любой другой период деятельности для получения статистики и расчета выручки, чистой прибыли, расходов и налогов. Для изменения или удаления сделки кликнете по ней. Для закрытия окна редактирования сделки нажмите кнопку &quot;Сохранить&quot;. Для удаления сделки в окне редактирования нажмите кнопку &quot;Удалить&quot;. При использовании УСН 15% в графе расходы указывайте расходы в соответствие со ст. 346.16 НК РФ для точного расчета налогов." TextWrapping="WrapWholeWords"  Margin="20,15,0,0" RelativePanel.Below="TextBlockCreateDocuments5" Width="700"/>
            <TextBlock Visibility="Collapsed" x:Name="TextBlockCreateDocumentsOpisanie6" Text="*Примечание. Для расчета итоговой суммы налогов выберите из базы при помощи поиска только те сделки, у которых статус &quot;Завершена&quot;" TextWrapping="WrapWholeWords"  Margin="20,5,0,0" RelativePanel.Below="TextBlockCreateDocumentsOpisanie5" Width="700" FontStyle="Italic"/>


            <Button x:Name="ButtonSearchOpen" Content="+" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockCreateDocumentsOpisanie6" Margin="20,30,0,0" Click="ButtonSearchOpen_Click" />
            <TextBlock x:Name="TextBlockSearchOpen" Text="ПОИСК ПО БАЗЕ СДЕЛОК" RelativePanel.Below="TextBlockCreateDocumentsOpisanie6" RelativePanel.RightOf="ButtonSearchOpen" Margin="10,34,0,0" FontWeight="SemiBold"/>
           

            <TextBlock x:Name="TextBlockSearchKontragent" Text="Поиск по имени контрагента:" RelativePanel.Below="ButtonSearchOpen" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchKontragent" Width="300" RelativePanel.Below="ButtonSearchOpen" RelativePanel.RightOf="TextBlockSearchKontragent" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите имя контрагента" TextChanged="TextBoxSearchKontragent_TextChanged"/>
            <Button x:Name="ButtonSearchKontragent" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="ButtonSearchOpen" RelativePanel.RightOf="TextBoxSearchKontragent" Click="ButtonSearchKontragent_Click" Visibility="Collapsed" Margin="10,20,0,0"/>

            <TextBlock x:Name="TextBlockSearchINN" Text="Поиск по ИНН контрагента:" RelativePanel.Below="TextBlockSearchKontragent" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchINN" Width="300" RelativePanel.Below="TextBlockSearchKontragent" RelativePanel.RightOf="TextBlockSearchINN" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите ИНН контрагента" TextChanged="TextBoxSearchINN_TextChanged"/>
            <Button x:Name="ButtonSearchINN" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockSearchKontragent" RelativePanel.RightOf="TextBoxSearchINN" Click="ButtonSearchINN_Click" Visibility="Collapsed" Margin="10,20,0,0"/>

            <TextBlock x:Name="TextBlockSearchMyName" Text="Поиск по моему наименованию:" RelativePanel.Below="TextBlockSearchINN" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchMyName" Width="300" RelativePanel.Below="TextBlockSearchINN" RelativePanel.RightOf="TextBlockSearchMyName" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите своё наименование" TextChanged="TextBoxSearchMyName_TextChanged"/>
            <Button x:Name="ButtonSearchMyName" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockSearchINN" RelativePanel.RightOf="TextBoxSearchMyName" Click="ButtonSearchMyName_Click" Visibility="Collapsed" Margin="10,20,0,0"/>

            <TextBlock x:Name="TextBlockSearchDovorNumber" Text="Поиск по номеру договора:" RelativePanel.Below="TextBlockSearchMyName" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchDovorNumber" Width="300" RelativePanel.Below="TextBlockSearchMyName" RelativePanel.RightOf="TextBlockSearchDovorNumber" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите номер договора" TextChanged="TextBoxSearchDovorNumber_TextChanged"/>
            <Button x:Name="ButtonSearchDovorNumber" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockSearchMyName" RelativePanel.RightOf="TextBoxSearchDovorNumber" Click="ButtonSearchDovorNumber_Click" Visibility="Collapsed" Margin="10,20,0,0"/>

            <TextBlock x:Name="TextBlockSearchDogovorDate" Text="Поиск по дате договора:" RelativePanel.Below="TextBlockSearchDovorNumber" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchDogovorDate" Width="300" RelativePanel.Below="TextBlockSearchDovorNumber" RelativePanel.RightOf="TextBlockSearchDogovorDate" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите дату договора" TextChanged="TextBoxSearchDogovorDate_TextChanged"/>
            <Button x:Name="ButtonSearchDogovorDate" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockSearchDovorNumber" RelativePanel.RightOf="TextBoxSearchDogovorDate" Click="ButtonSearchDogovorDate_Click" Visibility="Collapsed" Margin="10,20,0,0"/>

            <TextBlock x:Name="TextBlockSearchNakladnajaDate" Text="Поиск по дате накладной:" RelativePanel.Below="TextBlockSearchDogovorDate" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchNakladnajaDate" Width="300" RelativePanel.Below="TextBlockSearchDogovorDate" RelativePanel.RightOf="TextBlockSearchNakladnajaDate" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите дату накладной" TextChanged="TextBoxSearchNakladnajaDate_TextChanged"/>
            <Button x:Name="ButtonSearchNakladnajaDate" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockSearchDogovorDate" RelativePanel.RightOf="TextBoxSearchNakladnajaDate" Click="ButtonSearchNakladnajaDate_Click"  Visibility="Collapsed" Margin="10,20,0,0"/>

            <TextBlock x:Name="TextBlockSearchAktDate" Text="Поиск по дате акта:" RelativePanel.Below="TextBlockSearchNakladnajaDate" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchAktDate" Width="300" RelativePanel.Below="TextBlockSearchNakladnajaDate" RelativePanel.RightOf="TextBlockSearchAktDate" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите дату акта" TextChanged="TextBoxSearchAktDate_TextChanged"/>
            <Button x:Name="ButtonSearchAktDate" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockSearchNakladnajaDate" RelativePanel.RightOf="TextBoxSearchAktDate" Click="ButtonSearchAktDate_Click" Visibility="Collapsed" Margin="10,20,0,0"/>

            <TextBlock x:Name="TextBlockSearchKontaktName" Text="Поиск по имени контактного лица:" RelativePanel.Below="TextBlockSearchAktDate" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchKontaktName" Width="300" RelativePanel.Below="TextBlockSearchAktDate" RelativePanel.RightOf="TextBlockSearchKontaktName" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите имя контакта" TextChanged="TextBoxSearchKontakName_TextChanged"/>
            <Button x:Name="ButtonSearchKontaktName" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockSearchAktDate" RelativePanel.RightOf="TextBoxSearchKontaktName" Click="ButtonSearchKontaktName_Click" Visibility="Collapsed" Margin="10,20,0,0"/>

            <TextBlock x:Name="TextBlockSearchKontaktPhone" Text="Поиск по контактному телефону:" RelativePanel.Below="TextBlockSearchKontaktName" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchKontaktPhone" Width="300" RelativePanel.Below="TextBlockSearchKontaktName" RelativePanel.RightOf="TextBlockSearchKontaktPhone" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите телефон" TextChanged="TextBoxSearchKontaktPhone_TextChanged"/>
            <Button x:Name="ButtonSearchKontaktPhone" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockSearchKontaktName" RelativePanel.RightOf="TextBoxSearchKontaktPhone" Click="ButtonSearchKontaktPhone_Click"  Visibility="Collapsed" Margin="10,20,0,0"/>


            <TextBlock x:Name="TextBlockSearchStatusSdelki" Text="Поиск по статусу сделки:" RelativePanel.Below="TextBlockSearchKontaktPhone" Margin="30,20,0,0" Width="300" TextWrapping="WrapWholeWords" Visibility="Collapsed"/>
            <ComboBox x:Name="SearchComboBoxStatusSdelki1" Margin="10,20,0,0"  Width="300" HorizontalAlignment="Left" RelativePanel.Below="TextBlockSearchKontaktPhone" RelativePanel.RightOf="TextBlockSearchStatusSdelki" Visibility="Collapsed">
                <ComboBoxItem x:Name="Combo1011" Content="Выберите статус" IsSelected="True"/>
                <ComboBoxItem x:Name="Combo111" Content="Сделано предложение" />
                <ComboBoxItem x:Name="Combo112" Content="Заключен договор, выставлен счет" />
                <ComboBoxItem x:Name="Combo113" Content="В работе" />
                <ComboBoxItem x:Name="Combo114" Content="Исполнена, ожидает подписания актов/накладных" />
                <ComboBoxItem x:Name="Combo115" Content="Ожидание оплаты" />
                <ComboBoxItem x:Name="Combo116" Content="Завершена" />
                <ComboBoxItem x:Name="Combo117" Content="Договор расторгнут" />
            </ComboBox>
            <Button x:Name="ButtonSearchStatusSdelki" Content=">" Background="#99BC64" Foreground="White" RelativePanel.Below="TextBlockSearchKontaktPhone" RelativePanel.RightOf="SearchComboBoxStatusSdelki1" Click="ButtonSearchStatusSdelki_Click"  Visibility="Collapsed" Margin="10,20,0,0"/>

            <TextBlock x:Name="TextBlockSearchNalogYear" Text="Показать завершенные сделки за год:" RelativePanel.Below="ButtonSearchStatusSdelki" Margin="30,20,0,0" Visibility="Collapsed" Width="300" TextWrapping="WrapWholeWords"/>
            <AutoSuggestBox x:Name="TextBoxSearchNalogYear" Width="300" RelativePanel.Below="ButtonSearchStatusSdelki" RelativePanel.RightOf="TextBlockSearchNalogYear" Margin="10,20,0,0" Visibility="Collapsed" PlaceholderText="Введите год" TextChanged="TextBoxSearchNalogYear_TextChanged"/>
            <Button x:Name="ButtonSearchNalogYear" Content=">" RelativePanel.Below="ButtonSearchStatusSdelki" RelativePanel.RightOf="TextBoxSearchNalogYear" Click="ButtonSearchNalogYear_Click" Margin="10,20,0,0" Visibility="Collapsed"  Background="#99BC64" Foreground="White"/>


            <TextBlock x:Name="TextBlockSearchNalogKvartal" Text="Показать завершенные сделки за квартал:" RelativePanel.Below="TextBlockSearchNalogYear" Margin="30,25,0,0" Visibility="Collapsed" Width="300" TextWrapping="WrapWholeWords"/>
            <ComboBox x:Name="ComboBoxKvartalSdelkiSearch" Margin="10,25,0,0"  Width="300" RelativePanel.Below="TextBlockSearchNalogYear" RelativePanel.RightOf="TextBlockSearchNalogKvartal" Visibility="Collapsed">
                <ComboBoxItem x:Name="ComboKvartalSearch0" Content="Выберите квартал" IsSelected="True"/>
                <ComboBoxItem x:Name="ComboKvartalSearch1" Content="Первый квартал (янв-мар)" />
                <ComboBoxItem x:Name="ComboKvartalSearch2" Content="Второй квартал (апр-июн)"  />
                <ComboBoxItem x:Name="ComboKvartalSearch3" Content="Третий квартал (июл-сен)" />
                <ComboBoxItem x:Name="ComboKvartalSearch4" Content="Четвертый квартал (окт-дек)" />
            </ComboBox>
            <TextBlock x:Name="TextBlockComboSearchNalogKvartalBuffer" Visibility="Collapsed"/>
            <TextBlock x:Name="TextBlockSearchNalogKvartalYear" Text="Год:" Margin="10,25,0,0" RelativePanel.Below="TextBlockSearchNalogYear" RelativePanel.RightOf="ComboBoxKvartalSdelkiSearch" Visibility="Collapsed"/>
            <AutoSuggestBox x:Name="TextBoxSearchNalogKvartalYear" Width="100" RelativePanel.Below="TextBlockSearchNalogYear" RelativePanel.RightOf="TextBlockSearchNalogKvartalYear" Margin="10,25,0,0" Visibility="Collapsed" PlaceholderText="Год" TextChanged="TextBoxSearchNalogKvartalYear_TextChanged"/>
            <Button x:Name="ButtonSearchNalogKvartal" Content=">" RelativePanel.Below="TextBlockSearchNalogYear" RelativePanel.RightOf="TextBoxSearchNalogKvartalYear" Margin="10,25,0,0" Click="ButtonSearchNalogKvartal_Click" Visibility="Collapsed" Background="#99BC64" Foreground="White"/>

            
            <Button x:Name="ButtonShowWholeBase" Content="Показать всю базу" Background="#99BC64" Foreground="White" RelativePanel.Below="ButtonSearchNalogKvartal" Margin="20,25,0,0" Click="ButtonShowWholeBase_Click" Visibility="Collapsed"/>
            <Rectangle x:Name="RazdelitelSearch" RelativePanel.Below="ButtonShowWholeBase" Width="1180" Height="0.75" Fill="LightGray" Margin="10,20,0,0" Visibility="Collapsed"/>

            <Button x:Name="ButtonOtobrazhenieOpen" Content="+" Background="#99BC64" Foreground="White" RelativePanel.Below="RazdelitelSearch" Margin="20,20,0,0" Click="ButtonOtobrazhenieOpen_Click"/>
            <TextBlock x:Name="TextBlockOtobrazhenieOpen" Text="НАСТРОЙКИ ОТОБРАЖЕНИЯ" RelativePanel.Below="RazdelitelSearch" RelativePanel.RightOf="ButtonOtobrazhenieOpen" Margin="10,24,0,0" FontWeight="SemiBold"/>

            <StackPanel x:Name="StackPanelOtobrazhenie" Orientation="Horizontal" RelativePanel.Below="ButtonOtobrazhenieOpen" Margin="30,20,0,0" Visibility="Collapsed">
                <TextBlock Text="Отображать столбцы:" Margin="0,13,0,0" />
                <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                    <CheckBox x:Name="CheckBoxINN" Checked="CheckBoxINN_Checked" Unchecked="CheckBoxINN_Unchecked" Content="ИНН контрагента" Margin="0,7,0,0" />
                    <CheckBox x:Name="CheckBoxMyName" Checked="CheckBoxMyName_Checked" Unchecked="CheckBoxMyName_Unchecked" Content="Мое наименование"  Margin="0,7,0,0" />
                    <CheckBox x:Name="CheckBoxDogovorDate" Checked="CheckBoxDogovorDate_Checked" Unchecked="CheckBoxDogovorDate_Unchecked" Content="Дата договора"  Margin="0,7,0,0" />
                    <CheckBox x:Name="CheckBoxDogovorNumber" Checked="CheckBoxDogovorNumber_Checked" Unchecked="CheckBoxDogovorNumber_Unchecked" Content="Номер договора"  Margin="0,7,0,0" />
                    <CheckBox x:Name="CheckBoxNakladnajaDate" Checked="CheckBoxNakladnajaDate_Checked" Unchecked="CheckBoxNakladnajaDate_Unchecked" Content="Дата накладной"  Margin="0,7,0,0" />
                    <CheckBox x:Name="CheckBoxAktDate" Checked="CheckBoxAktDate_Checked" Unchecked="CheckBoxAktDate_Unchecked" Content="Дата акта"  Margin="0,7,0,0" />
                    <CheckBox x:Name="CheckBoxStatusSdelki" Checked="CheckBoxStatusSdelki_Checked" Unchecked="CheckBoxStatusSdelki_Unchecked" Content="Статус сделки"  Margin="0,7,0,0" />
                </StackPanel>
                <StackPanel Orientation="Vertical" Margin="20,0,0,0">
                    <CheckBox x:Name="CheckBoxRasxodi" Checked="CheckBoxRasxodi_Checked" Unchecked="CheckBoxRasxodi_Unchecked" Content="Расходы"   Margin="0,7,0,0"/>
                    <CheckBox x:Name="CheckBoxSummaItogo" Checked="CheckBoxSummaItogo_Checked" Unchecked="CheckBoxSummaItogo_Unchecked" Content="Стоимость договора"  Margin="0,7,0,0"/>
                    <CheckBox x:Name="CheckBoxKontaktName" Checked="CheckBoxKontaktName_Checked" Unchecked="CheckBoxKontaktName_Unchecked" Content="Контактное лицо"  Margin="0,7,0,0"/>
                    <CheckBox x:Name="CheckBoxKontaktPhone" Checked="CheckBoxKontaktPhone_Checked" Unchecked="CheckBoxKontaktPhone_Unchecked" Content="Контактный телефон"  Margin="0,7,0,0"/>
                    <CheckBox x:Name="CheckBoxKvartalSdelki" Checked="CheckBoxKvartalSdelki_Checked" Unchecked="CheckBoxKvartalSdelki_Unchecked" Content="Квартал завершения сделки"  Margin="0,7,0,0"/>
                    <CheckBox x:Name="CheckBoxYearSdelki" Checked="CheckBoxYearSdelki_Checked" Unchecked="CheckBoxYearSdelki_Unchecked" Content="Год завершения сделки"  Margin="0,7,0,0"/>
                    <CheckBox x:Name="CheckBoxPrimechanie" Checked="CheckBoxPrimechanie_Checked"  Unchecked="CheckBoxPrimechanie_Unchecked"  Content="Примечание"  Margin="0,7,0,0"/>
                </StackPanel>
            </StackPanel>
            <Rectangle x:Name="RazdelitelOtobrazhenie" RelativePanel.Below="StackPanelOtobrazhenie" Width="1180" Height="0.75" Fill="LightGray" Margin="10,20,0,0" Visibility="Collapsed"/>


            <Button x:Name="AddSdelka" Content="Добавить новую сделку" RelativePanel.Below="RazdelitelOtobrazhenie" Margin="20,40,0,0" Click="AddSdelka_Click"/>
            <Button x:Name="AddSdelkaFile" Content="Добавить сделку из файла .docdata" RelativePanel.Below="RazdelitelOtobrazhenie" RelativePanel.RightOf="AddSdelka" Margin="20,40,0,0" Click="AddSdelkaFile_Click"/>
            <TextBlock x:Name="StatusSearch" Visibility="Collapsed" Text="ALL"/>
            <Button x:Name="ButtonRasschetPokazatelej" Content="Рассчитать ключевые показатели" RelativePanel.Below="AddSdelka" Margin="20,20,0,0" Click="ButtonRasschetPokazatelej_Click"  Background="#99BC64" Foreground="White" />



            <Rectangle x:Name="Razdelitel1" RelativePanel.Below="ButtonRasschetPokazatelej" Width="2240" Height="0.75" Fill="LightGray" Margin="10,20,0,0"/>

            <StackPanel x:Name="PanelZagolovokRow" Margin="20,25,0,0" HorizontalAlignment="Center" Orientation="Horizontal" RelativePanel.Below="Razdelitel1">
                <TextBlock FontSize="15" x:Name="TextBlockKontrTable" Text="Наименование контрагента" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockINNTable" Text="ИНН контрагента" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockMyNameTable" Text="Моё наименование" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockDogovorDateTable" Text="Дата договора" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockDogovorNumberTable" Text="Номер договора" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockNakladnajaDateTable" Text="Дата накладной" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockAktDateTable" Text="Дата акта" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockRasxodiTable" Text="Расходы [₽]" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockSummaItogoTable" Text="Стоимость договора [₽]" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockStatusSdelkiTable" Text="Статус сделки" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockKontaktNameTable" Text="Контактное лицо" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockKontaktPhoneTable" Text="Контактный телефон" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockKvartalSdelkiTable" Text="Квартал завершения сделки" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockYearSdelkiTable" Text="Год завершения сделки" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                <TextBlock FontSize="15" x:Name="TextBlockPrimechanieTable" Text="Примечание" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
            </StackPanel>

            <Rectangle x:Name="Razdelitel2" RelativePanel.Below="PanelZagolovokRow" Width="2240" Height="0.75" Fill="LightGray" Margin="10,20,0,0"/>

            <ListView Name="SdelkiList" ItemsSource="{x:Bind Sdelki}" IsItemClickEnabled="True" ItemClick="SdelkiList_ItemClick" RelativePanel.Below="Razdelitel2" Margin="10,20,0,0">
                <ListView.ItemTemplate>
                    <DataTemplate x:DataType="data:SdelkiData">
                        <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
                            <TextBlock FontSize="14" Text="{x:Bind KONTRNAME}" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind INN}" Visibility="{x:Bind IsVisibleINN}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind INAME}" Visibility="{x:Bind IsVisibleINAME}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind DOGOVORDATE}"  Visibility="{x:Bind IsVisibleDOGOVORDATE}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind DOGOVORNUMBER}"  Visibility="{x:Bind IsVisibleDOGOVORNUMBER}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind NAKLADNAJADATE}"  Visibility="{x:Bind IsVisibleNAKLADNAJADATE}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind AKTDATE}"  Visibility="{x:Bind IsVisibleAKTDATE}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind RASXODI}"  Visibility="{x:Bind IsVisibleRASXODI}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind SUMMAITOGO}"  Visibility="{x:Bind IsVisibleSUMMAITOGO}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind STATUSSDELKI}"  Visibility="{x:Bind IsVisibleSTATUSSDELKI}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>

                            <TextBlock FontSize="14" Text="{x:Bind KONTAKTNAME}"  Visibility="{x:Bind IsVisibleKONTAKTNAME}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind KONTAKTPHONE}"  Visibility="{x:Bind IsVisibleKONTAKTPHONE}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind KVARTALSDELKI}"  Visibility="{x:Bind IsVisibleKVARTALSDELKI}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind YEARSDELKI}"  Visibility="{x:Bind IsVisibleYEARSDELKI}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>
                            <TextBlock FontSize="14" Text="{x:Bind PRIMECHANIE}"  Visibility="{x:Bind IsVisiblePRIMECHANIE}" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="10,0,0,0" Width="150" TextWrapping="WrapWholeWords" TextAlignment="Left"/>

                        </StackPanel>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>

            <Rectangle x:Name="Razdelitel3" RelativePanel.Below="SdelkiList" Width="2240" Height="0.75" Fill="LightGray" Margin="10,30,0,0"/>


            <Button x:Name="SaveSdelki" Visibility="Collapsed" Content="Сохранить сделки в базу" RelativePanel.Below="AddSdelkaFile" Margin="20,20,0,0" Click="SaveSdelki_Click" />
            <Button x:Name="DELETETABLE" Visibility="Collapsed" Content="Удалить таблицу" RelativePanel.Below="AddSdelkaFile" Margin="20,20,0,0" Click="DELETETABLE_Click" />


            <Button Visibility="Collapsed" x:Name="ButtonSummaItogoKlient" Content="Посчитать сумму всех доходов" RelativePanel.Below="AddSdelka" Margin="20,20,0,0" Click="ButtonSummaItogoKlient_Click" Background="#99BC64" Foreground="White" />
            <TextBlock Visibility="Collapsed" x:Name="TextBlockSummaItogoKlientBuffer" />
            <Button Visibility="Collapsed" x:Name="ButtonSummaItogoRasxodi" Content="Посчитать сумму всех расходов" RelativePanel.Below="AddSdelka" RelativePanel.RightOf="ButtonSummaItogoKlient" Margin="20,20,0,0" Click="ButtonSummaItogoRasxodi_Click"  Background="#99BC64" Foreground="White" />
            <TextBlock Visibility="Collapsed" x:Name="TextBlockSummaItogoRasxodiBuffer" />

            <Button Visibility="Collapsed" x:Name="ButtonPribil" Content="Посчитать прибыль" RelativePanel.Below="AddSdelka" RelativePanel.RightOf="ButtonSummaItogoRasxodi" Margin="20,20,0,0" Click="ButtonPribil_Click"  Background="#99BC64" Foreground="White" />
            <TextBlock Visibility="Collapsed" x:Name="TextBlockPribilBuffer" />

            
            <TextBlock x:Name="StatusFile" RelativePanel.Below="Razdelitel3" Margin="20,40,0,0" />

            <TextBlock RelativePanel.Below="StatusFile" Margin="20,40,0,0"/>

            <ContentDialog x:Name="ContentDialogPokazateli" VerticalAlignment="Stretch" Title="КЛЮЧЕВЫЕ ПОКАЗАТЕЛИ" Padding="40,40,40,40" PrimaryButtonText="Закрыть" PrimaryButtonClick="ContentDialogPokazateli_PrimaryButtonClick">
                <StackPanel Orientation="Vertical">
                    
                    <StackPanel Orientation="Horizontal" Margin="20,20,0,0">
                        <TextBlock Text="ДОХОДЫ:" FontWeight="SemiBold" HorizontalAlignment="Left"/>
                        <TextBlock x:Name="TextBlockPanelDoxodi" Margin="10,0,0,0" Foreground="DarkGreen" FontWeight="Bold" />
                        <TextBlock Text=" ₽" Foreground="DarkGreen" FontWeight="Bold" />
                    </StackPanel>

                    <StackPanel Orientation="Horizontal" Margin="20,20,0,0">
                        <TextBlock Text="РАСХОДЫ:" FontWeight="SemiBold" HorizontalAlignment="Left"/>
                        <TextBlock x:Name="TextBlockPanelRasxodi" Margin="10,0,0,0" Foreground="DarkGreen" FontWeight="Bold" />
                        <TextBlock Text=" ₽" Foreground="DarkGreen" FontWeight="Bold" />
                    </StackPanel>

                    <StackPanel Orientation="Horizontal" Margin="20,20,0,0">
                        <TextBlock Text="ПРИБЫЛЬ:" FontWeight="SemiBold" HorizontalAlignment="Left"/>
                        <TextBlock x:Name="TextBlockPanelPribil" Margin="10,0,0,0" Foreground="DarkGreen" FontWeight="Bold" />
                        <TextBlock Text=" ₽" Foreground="DarkGreen" FontWeight="Bold" />
                    </StackPanel>

                    <StackPanel Orientation="Horizontal" Margin="20,20,0,0">
                        <TextBlock Text="НАЛОГ:" FontWeight="SemiBold" HorizontalAlignment="Left"/>
                        <TextBlock x:Name="TextBlockPanelNalog" Margin="10,0,0,0" Foreground="DarkGreen" FontWeight="Bold" TextWrapping="WrapWholeWords"/>
                        
                    </StackPanel>

                    <StackPanel Orientation="Horizontal" Margin="20,20,0,0">
                        <TextBlock Text="ПРИБЫЛЬ:" FontWeight="SemiBold" HorizontalAlignment="Left"/>
                        <TextBlock x:Name="TextBlockPanelPribilAfterNalogi" Margin="10,0,0,0" Foreground="DarkGreen" FontWeight="Bold" />
                        <TextBlock Text=" ₽" Foreground="DarkGreen" FontWeight="Bold" />
                        <TextBlock Margin="10,0,0,0" Text="(после уплаты налога УСН)"/>
                    </StackPanel>

                    <StackPanel x:Name="StackPanelNalogWarning" Orientation="Horizontal" Margin="20,20,0,0" Visibility="Collapsed">
                        <TextBlock x:Name="TextBlockPanelNalogWarning" Margin="10,0,0,0" Foreground="Black" FontWeight="Bold" TextWrapping="WrapWholeWords" HorizontalAlignment="Left" Width="300"/>
                    </StackPanel>

                </StackPanel>
            </ContentDialog>



            <ContentDialog x:Name="ContentDialogAddNewSdelka" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Title="Добавить сделку" PrimaryButtonText="Добавить" SecondaryButtonText="Закрыть" Width="500" MinWidth="400" MaxWidth="750" PrimaryButtonClick="ContentDialogAddNewSdelka_PrimaryButtonClick">
                <ScrollViewer VerticalScrollBarVisibility="Auto" VerticalScrollMode="Auto">
                    <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Наименование контрагента (сокр.):" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                        <AutoSuggestBox x:Name="TextBoxKontrName" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxKontrName_TextChanged"/>
                    </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="ИНН контрагента:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxINN" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxINN_TextChanged"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                        <TextBlock Text="Моё наименование (сокр.):" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                        <AutoSuggestBox x:Name="TextBoxMyName" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxMyName_TextChanged"/>
                    </StackPanel>

                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Дата заключения договора:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                        <AutoSuggestBox x:Name="TextBoxDogovorDate" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxDogovorDate_TextChanged"/>
                    </StackPanel>

                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Номер договора:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                        <AutoSuggestBox x:Name="TextBoxDogovorNumber" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxDogovorNumber_TextChanged"/>
                    </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Контактное лицо (ФИО):" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxKONTAKTNAME" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxKONTAKTNAME_TextChanged"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Контактный телефон:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxKONTAKTPHONE" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxKONTAKTPHONE_TextChanged"/>
                        </StackPanel>



                        <StackPanel Orientation="Vertical">
                        <TextBlock Text="Дата подписания накладной:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                        <TextBox x:Name="TextBoxNakladnajaData" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                    </StackPanel>

                    <StackPanel Orientation="Vertical">
                        <TextBlock Text="Дата подписания акта:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                        <TextBox x:Name="TextBoxAktData" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                    </StackPanel>

                    <StackPanel Orientation="Vertical">
                            <TextBlock Text="Сумма расходов при исполнении договора [₽]:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                        <TextBox x:Name="TextBoxRasxodi" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                    </StackPanel>

                    <StackPanel Orientation="Vertical">
                            <TextBlock Text="Полная стоимость сделки [₽]:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                        <TextBox x:Name="TextBoxSummaItogo" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                    </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Примечание:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <TextBox x:Name="TextBoxPrimechanie" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                        </StackPanel>

                        <StackPanel x:Name="PanelWithCombobox" Orientation="Vertical">
                           <TextBlock Text="Статус сделки:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                           <ComboBox x:Name="ComboBoxStatusSdelki1" Margin="20,10,0,0"  Width="300" HorizontalAlignment="Left">
                            <ComboBoxItem x:Name="Combo011" Content="Выберите статус" IsSelected="True"/>
                            <ComboBoxItem x:Name="Combo11" Content="Сделано предложение" />
                            <ComboBoxItem x:Name="Combo12" Content="Заключен договор, выставлен счет" />
                            <ComboBoxItem x:Name="Combo13" Content="В работе" />
                            <ComboBoxItem x:Name="Combo14" Content="Исполнена, ожидает подписания актов/накладных" />
                            <ComboBoxItem x:Name="Combo15" Content="Ожидание оплаты" />
                            <ComboBoxItem x:Name="Combo16" Content="Завершена" />
                            <ComboBoxItem x:Name="Combo17" Content="Договор расторгнут" />
                        </ComboBox>
                            <TextBlock x:Name="AddComboBuffer" Visibility="Collapsed"/>
                        </StackPanel>

                        <StackPanel x:Name="PanelKvartalSdelki" Orientation="Vertical">
                            <TextBlock Text="ДАННЫЕ ДЛЯ НАЛОГОВОГО УЧЕТА" Margin="20,20,0,0" HorizontalAlignment="Left" FontWeight="SemiBold"/>
                            <TextBlock Text="Квартал завершения сделки:" Margin="20,15,0,0" HorizontalAlignment="Left"/>
                            <ComboBox x:Name="ComboBoxKvartalSdelki1" Margin="20,10,0,0"  Width="300" HorizontalAlignment="Left">
                                <ComboBoxItem x:Name="ComboKvartal0" Content="Выберите квартал" IsSelected="True"/>
                                <ComboBoxItem x:Name="ComboKvartal1" Content="Первый квартал (янв-мар)" />
                                <ComboBoxItem x:Name="ComboKvartal2" Content="Второй квартал (апр-июн)"  />
                                <ComboBoxItem x:Name="ComboKvartal3" Content="Третий квартал (июл-сен)" />
                                <ComboBoxItem x:Name="ComboKvartal4" Content="Четвертый квартал (окт-дек)" />
                            </ComboBox>
                            <TextBlock Text="Год сделки:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxSdelkaYear" Margin="20,10,0,0" HorizontalAlignment="Left" Width="300" TextChanged="TextBoxSdelkaYear_TextChanged"/>
                            <TextBlock x:Name="ComboBoxKvartalSdelki1Buffer" Visibility="Collapsed"/>
                        </StackPanel>

                    </StackPanel>
                </ScrollViewer>
            </ContentDialog>


            <ContentDialog x:Name="ContentDialogChangeSdelka" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Title="Редактировать сделку" PrimaryButtonText="Сохранить и закрыть"  SecondaryButtonText="Удалить" MinWidth="400" MaxWidth="750" PrimaryButtonClick="ContentDialogChangeSdelka_PrimaryButtonClick"  SecondaryButtonClick="ContentDialogChangeSdelka_SecondaryButtonClick" >
                <ScrollViewer VerticalScrollBarVisibility="Auto" VerticalScrollMode="Auto">
                    <StackPanel Orientation="Vertical">
                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Наименование контрагента (сокр.):" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxKontrName1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxKontrName1_TextChanged"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="ИНН контрагента:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxINN1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxINN1_TextChanged"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Моё наименование (сокр.):" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxMyName1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxMyName1_TextChanged"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Дата заключения договора:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxDogovorDate1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxDogovorDate1_TextChanged"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Номер договора:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxDogovorNumber1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxDogovorNumber1_TextChanged"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Контактное лицо (ФИО):" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxKONTAKTNAME1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxKONTAKTNAME1_TextChanged"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Контактный телефон:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxKONTAKTPHONE1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left" TextChanged="TextBoxKONTAKTPHONE1_TextChanged"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Дата подписания накладной:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <TextBox x:Name="TextBoxNakladnajaData1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Дата подписания акта:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <TextBox x:Name="TextBoxAktData1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Сумма расходов при исполнении договора [₽]:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <TextBox x:Name="TextBoxRasxodi1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Полная стоимость сделки [₽]:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <TextBox x:Name="TextBoxSummaItogo1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                        </StackPanel>

                        <StackPanel Orientation="Vertical">
                            <TextBlock Text="Примечание:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <TextBox x:Name="TextBoxPrimechanie1" Width="300" Margin="20,10,0,0" HorizontalAlignment="Left"/>
                        </StackPanel>

                        <StackPanel x:Name="PanelWithCombobox2" Orientation="Vertical">
                            <TextBlock Text="Статус сделки:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <ComboBox x:Name="ComboBoxStatusSdelki2" Margin="20,10,0,0"  Width="300" HorizontalAlignment="Left">
                                <ComboBoxItem x:Name="Combo2011" Content="Выберите статус"/>
                                <ComboBoxItem x:Name="Combo211" Content="Сделано предложение" />
                                <ComboBoxItem x:Name="Combo212" Content="Заключен договор, выставлен счет" />
                                <ComboBoxItem x:Name="Combo213" Content="В работе" />
                                <ComboBoxItem x:Name="Combo214" Content="Исполнена, ожидает подписания актов/накладных" />
                                <ComboBoxItem x:Name="Combo215" Content="Ожидание оплаты" />
                                <ComboBoxItem x:Name="Combo216" Content="Завершена" />
                                <ComboBoxItem x:Name="Combo217" Content="Договор расторгнут" />
                            </ComboBox>
                            <TextBlock x:Name="AddComboBuffer1" Visibility="Collapsed"/>
                        </StackPanel>

                        <StackPanel x:Name="PanelKvartalSdelki1" Orientation="Vertical">
                            <TextBlock Text="ДАННЫЕ ДЛЯ НАЛОГОВОГО УЧЕТА" Margin="20,20,0,0" HorizontalAlignment="Left" FontWeight="SemiBold"/>
                            <TextBlock Text="Квартал завершения сделки:" Margin="20,15,0,0" HorizontalAlignment="Left"/>
                            <ComboBox x:Name="ComboBoxKvartalSdelki11" Margin="20,10,0,0"  Width="300" HorizontalAlignment="Left">
                                <ComboBoxItem x:Name="ComboKvartal10" Content="Выберите квартал" IsSelected="True"/>
                                <ComboBoxItem x:Name="ComboKvartal11" Content="Первый квартал (янв-мар)" />
                                <ComboBoxItem x:Name="ComboKvartal12" Content="Второй квартал (апр-июн)"  />
                                <ComboBoxItem x:Name="ComboKvartal13" Content="Третий квартал (июл-сен)" />
                                <ComboBoxItem x:Name="ComboKvartal14" Content="Четвертый квартал (окт-дек)" />
                            </ComboBox>
                            <TextBlock Text="Год сделки:" Margin="20,20,0,0" HorizontalAlignment="Left"/>
                            <AutoSuggestBox x:Name="TextBoxSdelkaYear1" Margin="20,10,0,0" HorizontalAlignment="Left" Width="300" TextChanged="TextBoxSdelkaYear1_TextChanged"/>
                            <TextBlock x:Name="ComboBoxKvartalSdelki11Buffer" Visibility="Collapsed"/>
                        </StackPanel>

                    </StackPanel>
                </ScrollViewer>
            </ContentDialog>

            <ContentDialog x:Name="ContentDialogDelete" VerticalAlignment="Stretch" Title="Удалить сделку?" Padding="40,40,40,40" PrimaryButtonText="УДАЛИТЬ СДЕЛКУ" SecondaryButtonText="ОТМЕНА" PrimaryButtonClick="ContentDialogDelete_PrimaryButtonClick">
                <StackPanel Orientation="Vertical">
                    <StackPanel Orientation="Horizontal" Margin="20,20,0,0">
                        <TextBlock Text="СДЕЛКА БУДЕТ УДАЛЕНА." FontWeight="Bold" HorizontalAlignment="Left" Width="300" TextWrapping="WrapWholeWords"/>
                    </StackPanel>


                </StackPanel>
            </ContentDialog>

            <TextBlock x:Name="Buffer1" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer2" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer3" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer4" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer5" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer6" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer7" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer8" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer9" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer10" Visibility="Collapsed"/>
            <TextBlock x:Name="Buffer11" Visibility="Collapsed"/>

        </RelativePanel>


        <VisualStateManager.VisualStateGroups>
            <VisualStateGroup>
                <VisualState x:Name="WideState">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="800" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="TextBlockCreateDocuments5.Width" Value="700" />
                        <Setter Target="TextBlockCreateDocumentsOpisanie5.Width" Value="700" />
                        <Setter Target="StatusFile.Width" Value="700"/>


                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="WideState2">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="520" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="TextBlockCreateDocuments5.Width" Value="420" />
                        <Setter Target="TextBlockCreateDocumentsOpisanie5.Width" Value="420" />

                        <Setter Target="TextBoxSearchKontragent.(RelativePanel.Below)" Value="TextBlockSearchKontragent"/>
                        <Setter Target="TextBoxSearchKontragent.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchKontragent.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchKontragent.(RelativePanel.Below)" Value="TextBlockSearchKontragent"/>
                        <Setter Target="ButtonSearchKontragent.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchINN.(RelativePanel.Below)" Value="TextBoxSearchKontragent"/>
                        <Setter Target="TextBoxSearchINN.(RelativePanel.Below)" Value="TextBlockSearchINN"/>
                        <Setter Target="TextBoxSearchINN.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchINN.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchINN.(RelativePanel.Below)" Value="TextBlockSearchINN"/>
                        <Setter Target="ButtonSearchINN.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchMyName.(RelativePanel.Below)" Value="TextBoxSearchINN"/>
                        <Setter Target="TextBoxSearchMyName.(RelativePanel.Below)" Value="TextBlockSearchMyName"/>
                        <Setter Target="TextBoxSearchMyName.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchMyName.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchMyName.(RelativePanel.Below)" Value="TextBlockSearchMyName"/>
                        <Setter Target="ButtonSearchMyName.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchDovorNumber.(RelativePanel.Below)" Value="TextBoxSearchMyName"/>
                        <Setter Target="TextBoxSearchDovorNumber.(RelativePanel.Below)" Value="TextBlockSearchDovorNumber"/>
                        <Setter Target="TextBoxSearchDovorNumber.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchDovorNumber.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchDovorNumber.(RelativePanel.Below)" Value="TextBlockSearchDovorNumber"/>
                        <Setter Target="ButtonSearchDovorNumber.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchDogovorDate.(RelativePanel.Below)" Value="TextBoxSearchDovorNumber"/>
                        <Setter Target="TextBoxSearchDogovorDate.(RelativePanel.Below)" Value="TextBlockSearchDogovorDate"/>
                        <Setter Target="TextBoxSearchDogovorDate.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchDogovorDate.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchDogovorDate.(RelativePanel.Below)" Value="TextBlockSearchDogovorDate"/>
                        <Setter Target="ButtonSearchDogovorDate.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchNakladnajaDate.(RelativePanel.Below)" Value="TextBoxSearchDogovorDate"/>
                        <Setter Target="TextBoxSearchNakladnajaDate.(RelativePanel.Below)" Value="TextBlockSearchNakladnajaDate"/>
                        <Setter Target="TextBoxSearchNakladnajaDate.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchNakladnajaDate.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchNakladnajaDate.(RelativePanel.Below)" Value="TextBlockSearchNakladnajaDate"/>
                        <Setter Target="ButtonSearchNakladnajaDate.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchAktDate.(RelativePanel.Below)" Value="TextBoxSearchNakladnajaDate"/>
                        <Setter Target="TextBoxSearchAktDate.(RelativePanel.Below)" Value="TextBlockSearchAktDate"/>
                        <Setter Target="TextBoxSearchAktDate.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchAktDate.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchAktDate.(RelativePanel.Below)" Value="TextBlockSearchAktDate"/>
                        <Setter Target="ButtonSearchAktDate.Margin" Value="10,10,0,0"/>


                        <Setter Target="TextBlockSearchKontaktName.(RelativePanel.Below)" Value="TextBoxSearchAktDate"/>
                        <Setter Target="TextBoxSearchKontaktName.(RelativePanel.Below)" Value="TextBlockSearchKontaktName"/>
                        <Setter Target="TextBoxSearchKontaktName.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchKontaktName.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchKontaktName.(RelativePanel.Below)" Value="TextBlockSearchKontaktName"/>
                        <Setter Target="ButtonSearchKontaktName.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchKontaktPhone.(RelativePanel.Below)" Value="TextBoxSearchKontaktName"/>
                        <Setter Target="TextBoxSearchKontaktPhone.(RelativePanel.Below)" Value="TextBlockSearchKontaktPhone"/>
                        <Setter Target="TextBoxSearchKontaktPhone.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchKontaktPhone.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchKontaktPhone.(RelativePanel.Below)" Value="TextBlockSearchKontaktPhone"/>
                        <Setter Target="ButtonSearchKontaktPhone.Margin" Value="10,10,0,0"/>


                        <Setter Target="TextBlockSearchStatusSdelki.(RelativePanel.Below)" Value="TextBoxSearchKontaktPhone"/>
                        <Setter Target="SearchComboBoxStatusSdelki1.(RelativePanel.Below)" Value="TextBlockSearchStatusSdelki"/>
                        <Setter Target="SearchComboBoxStatusSdelki1.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="SearchComboBoxStatusSdelki1.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchStatusSdelki.(RelativePanel.Below)" Value="TextBlockSearchStatusSdelki"/>
                        <Setter Target="ButtonSearchStatusSdelki.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchNalogYear.(RelativePanel.Below)" Value="SearchComboBoxStatusSdelki1"/>
                        <Setter Target="TextBoxSearchNalogYear.(RelativePanel.Below)" Value="TextBlockSearchNalogYear"/>
                        <Setter Target="TextBoxSearchNalogYear.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchNalogYear.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchNalogYear.(RelativePanel.Below)" Value="TextBlockSearchNalogYear"/>
                        <Setter Target="ButtonSearchNalogYear.(RelativePanel.RightOf)" Value="TextBoxSearchNalogYear"/>
                        <Setter Target="ButtonSearchNalogYear.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchNalogKvartal.(RelativePanel.Below)" Value="TextBoxSearchNalogYear"/>
                        <Setter Target="ComboBoxKvartalSdelkiSearch.(RelativePanel.Below)" Value="TextBlockSearchNalogKvartal"/>
                        <Setter Target="ComboBoxKvartalSdelkiSearch.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="ComboBoxKvartalSdelkiSearch.Margin" Value="30,10,0,0"/>
                        <Setter Target="TextBlockSearchNalogKvartalYear.(RelativePanel.Below)" Value="ComboBoxKvartalSdelkiSearch"/>
                        <Setter Target="TextBlockSearchNalogKvartalYear.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBlockSearchNalogKvartalYear.Margin" Value="30,10,0,0"/>
                        <Setter Target="TextBoxSearchNalogKvartalYear.(RelativePanel.Below)" Value="ComboBoxKvartalSdelkiSearch"/>
                        <Setter Target="TextBoxSearchNalogKvartalYear.Margin" Value="10,10,0,0"/>
                        <Setter Target="ButtonSearchNalogKvartal.(RelativePanel.Below)" Value="ComboBoxKvartalSdelkiSearch"/>
                        <Setter Target="ButtonSearchNalogKvartal.Margin" Value="10,10,0,0"/>
                        <Setter Target="ButtonShowWholeBase.(RelativePanel.Below)" Value="TextBoxSearchNalogKvartalYear"/>

                        <Setter Target="StackPanelOtobrazhenie.Orientation" Value="Vertical"/>
                        <Setter Target="StatusFile.Width" Value="420"/>

                    </VisualState.Setters>
                </VisualState>
                <VisualState x:Name="NarrowState">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="0" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="TextBlockCreateDocuments5.Width" Value="300" />
                        <Setter Target="TextBlockCreateDocumentsOpisanie5.Width" Value="300" />


                        <Setter Target="TextBoxSearchKontragent.(RelativePanel.Below)" Value="TextBlockSearchKontragent"/>
                        <Setter Target="TextBoxSearchKontragent.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchKontragent.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchKontragent.(RelativePanel.Below)" Value="TextBlockSearchKontragent"/>
                        <Setter Target="ButtonSearchKontragent.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchINN.(RelativePanel.Below)" Value="TextBoxSearchKontragent"/>
                        <Setter Target="TextBoxSearchINN.(RelativePanel.Below)" Value="TextBlockSearchINN"/>
                        <Setter Target="TextBoxSearchINN.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchINN.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchINN.(RelativePanel.Below)" Value="TextBlockSearchINN"/>
                        <Setter Target="ButtonSearchINN.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchMyName.(RelativePanel.Below)" Value="TextBoxSearchINN"/>
                        <Setter Target="TextBoxSearchMyName.(RelativePanel.Below)" Value="TextBlockSearchMyName"/>
                        <Setter Target="TextBoxSearchMyName.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchMyName.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchMyName.(RelativePanel.Below)" Value="TextBlockSearchMyName"/>
                        <Setter Target="ButtonSearchMyName.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchDovorNumber.(RelativePanel.Below)" Value="TextBoxSearchMyName"/>
                        <Setter Target="TextBoxSearchDovorNumber.(RelativePanel.Below)" Value="TextBlockSearchDovorNumber"/>
                        <Setter Target="TextBoxSearchDovorNumber.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchDovorNumber.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchDovorNumber.(RelativePanel.Below)" Value="TextBlockSearchDovorNumber"/>
                        <Setter Target="ButtonSearchDovorNumber.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchDogovorDate.(RelativePanel.Below)" Value="TextBoxSearchDovorNumber"/>
                        <Setter Target="TextBoxSearchDogovorDate.(RelativePanel.Below)" Value="TextBlockSearchDogovorDate"/>
                        <Setter Target="TextBoxSearchDogovorDate.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchDogovorDate.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchDogovorDate.(RelativePanel.Below)" Value="TextBlockSearchDogovorDate"/>
                        <Setter Target="ButtonSearchDogovorDate.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchNakladnajaDate.(RelativePanel.Below)" Value="TextBoxSearchDogovorDate"/>
                        <Setter Target="TextBoxSearchNakladnajaDate.(RelativePanel.Below)" Value="TextBlockSearchNakladnajaDate"/>
                        <Setter Target="TextBoxSearchNakladnajaDate.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchNakladnajaDate.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchNakladnajaDate.(RelativePanel.Below)" Value="TextBlockSearchNakladnajaDate"/>
                        <Setter Target="ButtonSearchNakladnajaDate.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchAktDate.(RelativePanel.Below)" Value="TextBoxSearchNakladnajaDate"/>
                        <Setter Target="TextBoxSearchAktDate.(RelativePanel.Below)" Value="TextBlockSearchAktDate"/>
                        <Setter Target="TextBoxSearchAktDate.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchAktDate.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchAktDate.(RelativePanel.Below)" Value="TextBlockSearchAktDate"/>
                        <Setter Target="ButtonSearchAktDate.Margin" Value="10,10,0,0"/>

                        
                        <Setter Target="TextBlockSearchKontaktName.(RelativePanel.Below)" Value="TextBoxSearchAktDate"/>
                        <Setter Target="TextBoxSearchKontaktName.(RelativePanel.Below)" Value="TextBlockSearchKontaktName"/>
                        <Setter Target="TextBoxSearchKontaktName.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchKontaktName.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchKontaktName.(RelativePanel.Below)" Value="TextBlockSearchKontaktName"/>
                        <Setter Target="ButtonSearchKontaktName.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchKontaktPhone.(RelativePanel.Below)" Value="TextBoxSearchKontaktName"/>
                        <Setter Target="TextBoxSearchKontaktPhone.(RelativePanel.Below)" Value="TextBlockSearchKontaktPhone"/>
                        <Setter Target="TextBoxSearchKontaktPhone.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchKontaktPhone.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchKontaktPhone.(RelativePanel.Below)" Value="TextBlockSearchKontaktPhone"/>
                        <Setter Target="ButtonSearchKontaktPhone.Margin" Value="10,10,0,0"/>


                        <Setter Target="TextBlockSearchStatusSdelki.(RelativePanel.Below)" Value="TextBoxSearchKontaktPhone"/>
                        <Setter Target="SearchComboBoxStatusSdelki1.(RelativePanel.Below)" Value="TextBlockSearchStatusSdelki"/>
                        <Setter Target="SearchComboBoxStatusSdelki1.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="SearchComboBoxStatusSdelki1.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchStatusSdelki.(RelativePanel.Below)" Value="TextBlockSearchStatusSdelki"/>
                        <Setter Target="ButtonSearchStatusSdelki.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchNalogYear.(RelativePanel.Below)" Value="SearchComboBoxStatusSdelki1"/>
                        <Setter Target="TextBoxSearchNalogYear.(RelativePanel.Below)" Value="TextBlockSearchNalogYear"/>
                        <Setter Target="TextBoxSearchNalogYear.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBoxSearchNalogYear.Margin" Value="30,10,0,0"/>
                        <Setter Target="ButtonSearchNalogYear.(RelativePanel.Below)" Value="TextBlockSearchNalogYear"/>
                        <Setter Target="ButtonSearchNalogYear.(RelativePanel.RightOf)" Value="TextBoxSearchNalogYear"/>
                        <Setter Target="ButtonSearchNalogYear.Margin" Value="10,10,0,0"/>

                        <Setter Target="TextBlockSearchNalogKvartal.(RelativePanel.Below)" Value="TextBoxSearchNalogYear"/>
                        <Setter Target="ComboBoxKvartalSdelkiSearch.(RelativePanel.Below)" Value="TextBlockSearchNalogKvartal"/>
                        <Setter Target="ComboBoxKvartalSdelkiSearch.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="ComboBoxKvartalSdelkiSearch.Margin" Value="30,10,0,0"/>
                        <Setter Target="TextBlockSearchNalogKvartalYear.(RelativePanel.Below)" Value="ComboBoxKvartalSdelkiSearch"/>
                        <Setter Target="TextBlockSearchNalogKvartalYear.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="TextBlockSearchNalogKvartalYear.Margin" Value="30,10,0,0"/>
                        <Setter Target="TextBoxSearchNalogKvartalYear.(RelativePanel.Below)" Value="ComboBoxKvartalSdelkiSearch"/>
                        <Setter Target="TextBoxSearchNalogKvartalYear.Margin" Value="10,10,0,0"/>
                        <Setter Target="ButtonSearchNalogKvartal.(RelativePanel.Below)" Value="ComboBoxKvartalSdelkiSearch"/>
                        <Setter Target="ButtonSearchNalogKvartal.Margin" Value="10,10,0,0"/>
                        <Setter Target="ButtonShowWholeBase.(RelativePanel.Below)" Value="TextBoxSearchNalogKvartalYear"/>

                        <Setter Target="AddSdelkaFile.(RelativePanel.Below)" Value="AddSdelka"/>
                        <Setter Target="AddSdelkaFile.(RelativePanel.RightOf)" Value=""/>
                        <Setter Target="AddSdelkaFile.Margin" Value="20,20,0,0"/>
                        <Setter Target="ButtonRasschetPokazatelej.(RelativePanel.Below)" Value="AddSdelkaFile"/>

                        <Setter Target="StackPanelOtobrazhenie.Orientation" Value="Vertical"/>
                        <Setter Target="StatusFile.Width" Value="300"/>

                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>


    </ScrollViewer>
    

</Page>

